<?php
//
// Page Class
// The SDMworld! Network
//

uiLoadLibrary('page');


class clsUmlProject extends cDycmsObject
{
	protected $mClsId = 'UmlProject';

	const allowedTags = '<a><p><b><em><i><div><br><img><h1><h2><h3><h4>';
	
	function Render(cDycmsClientNode &$r_client)
	{
		global $gViewerUrl;

		// Wrapper
		$r_client->AddChild($main = new cUiLayer(array('class' => 'Content UmlProject')));
		
		// Title bar
		$main->AddChild($title = new cUiLayer(array('class' => 'ContentTitle')));
		$title->AddChild("Project: " . $this->mClass->GetIndexValue($this->mId, 'title'));

		$buf .= "</div>";
		
		// Main body (description)
		$main->AddChild($body = new cHtmlWrapperTag('div',array(
			'class' => 'ContentBody'
		)));
		
		$body->AddChild(new cUiWikiRenderer(cUiWikiRenderer::$zDefaultToks,
			$this->mAttributes['description'], clsUmlProject::allowedTags, array(
				'noParagraph' => true
		)));
		
		// Status box
		$main->AddChild($sbox = new cUiLayer(array('class' => 'RightSidebar')));
	}

	/*function DrawEditor(cUiEditor &$editor)
	{
		//
		// Draw the editor form
		//

		$editor->AddChild(new cUiTextBox(array(
			'name'=>'title',
			'value'=>$this->mTitle
		), 'Page Title'));
		
		$editor->AddChild(new cUiEditorTextArea('htmlbody',
			$this->mHtmlBody, null, false));
		
		$editor->AddDefaultButtons();
	}*/

	function GetSummary()
	{
		return $this->mClass->GetIndexValue($this->mId, 'title');
	}

	function LoadObject()
	{

	}

	function GetAttributes($bVals)
	{
		if($bVals)
		{

		}
		else
		{
			return array('title', 'htmlbody', 'htmlhead');
		};
	}

    function Create(){
    	$this->mAttributes = array('description' => 'Enter a description of the project.');
    }
}

?>
